include_directories(${CMAKE_SOURCE_DIR}/include)

if(HAVE_XPR_LIST)
add_executable(list-basic benchmark.c list-basic.c)
target_link_libraries(list-basic xpr)
endif()

if(HAVE_XPR_RTSP)
add_executable(rtsp-conn-open-close benchmark.c rtsp-conn-open-close.c)
target_link_libraries(rtsp-conn-open-close xpr)

add_executable(rtsp-conn-rx-264-with-log benchmark.c rtsp-conn-rx-264-with-log.c)
target_link_libraries(rtsp-conn-rx-264-with-log xpr)

add_executable(rtsp-conn-rx-264 benchmark.c rtsp-conn-rx-264.c)
target_link_libraries(rtsp-conn-rx-264 xpr)

add_executable(rtsp-conn-rx-aac benchmark.c rtsp-conn-rx-aac.c)
target_link_libraries(rtsp-conn-rx-aac xpr)

add_executable(rtsp-conn-start-stop benchmark.c rtsp-conn-start-stop.c)
target_link_libraries(rtsp-conn-start-stop xpr)

add_executable(rtsp-mgr-open-close benchmark.c rtsp-mgr-open-close.c)
target_link_libraries(rtsp-mgr-open-close xpr)

add_executable(rtsp-mgr-start-stop benchmark.c rtsp-mgr-start-stop.c)
target_link_libraries(rtsp-mgr-start-stop xpr)

add_executable(rtsp-svr-tx-264-with-auth benchmark.c rtsp-svr-tx-264-with-auth.c)
target_link_libraries(rtsp-svr-tx-264-with-auth xpr)

add_executable(rtsp-svr-tx-264-with-log benchmark.c rtsp-svr-tx-264-with-log.c)
target_link_libraries(rtsp-svr-tx-264-with-log xpr)

add_executable(rtsp-svr-tx-264 benchmark.c rtsp-svr-tx-264.c)
target_link_libraries(rtsp-svr-tx-264 xpr)

add_executable(rtsp-svr-tx-265 benchmark.c rtsp-svr-tx-265.c)
target_link_libraries(rtsp-svr-tx-265 xpr)

add_executable(rtsp-svr-tx-aac benchmark.c rtsp-svr-tx-aac.c)
target_link_libraries(rtsp-svr-tx-aac xpr)
endif()

if(HAVE_XPR_THREAD)
add_executable(thread-create-destroy benchmark.c thread-create-destroy.c)
target_link_libraries(thread-create-destroy xpr)
endif()

if(HAVE_XPR_TIMER)
add_executable(timer-basic benchmark.c timer-basic.c)
target_link_libraries(timer-basic xpr)
endif()
